/*
 * ImgUploadActivity.java
 * classes : com.ruint.master.app.activity.ImgUploadActivity
 * @author ruint
 * V 1.0.0R
 * Create at 2014-12-3 下午2:17:30
 */
package com.ruint.master.app.activity;

import java.io.Serializable;
import java.util.List;

import android.content.Intent;

import com.ruint.lib.mediachooser.activity.BaseMediaChooserActivity;
import com.ruint.lib.mediachooser.activity.TouchPagerActivity;
import com.ruint.lib.mediachooser.adapter.MediaGridAdapter;
import com.ruint.lib.mediachooser.bean.ImageItem;
import com.ruint.lib.mediachooser.core.MediaChooserConstants;
import com.ruint.master.R;
import com.ruint.master.view.Topbar;

/**
 * com.ruint.master.app.activity.ImgUploadActivity
 * 
 * @author ruint <br/>
 *         create at 2014-12-3 下午2:17:30
 */
public class ImgUploadActivity extends BaseMediaChooserActivity<MediaGridAdapter> {
  private List<ImageItem> mList;

  @Override
  protected int getLayoutResID() {
    return R.layout.activity_base_media_chooser;
  }

  @Override
  protected void onInitView() {
  }

  @Override
  protected void handleRelevancy() {
  }

  @Override
  protected void onLoadData() {
    mList = getImageItemList();
  }

  @Override
  protected int getGridViewID() {
    return R.id.media_grid;
  }

  @Override
  protected int getMediaChooseLimit() {
    return 10;
  }

  @Override
  protected void viewPhoto() {
    Intent pagerIntent = new Intent(thisInstance, TouchPagerActivity.class);
    pagerIntent.putExtra(MediaChooserConstants.MEDIA_SELECTED_LIST, (Serializable) mList);
    startActivity(pagerIntent);
  }

  @Override
  protected MediaGridAdapter getAdapter() {
    return new MediaGridAdapter(thisInstance);
  }

}
